Skip to content

Conversation

@ChrisZYJ
Copy link
Contributor

@ChrisZYJ ChrisZYJ commented Apr 1, 2025

Description

Fixes symmetric boundary (bc=-2) conditions for stresses (elasticity simulations).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Scope

  • This PR comprises a set of related changes with a common goal

How Has This Been Tested?

  • Old (wrong)
output.mp4
  • New (corrected)
output.mp4

Checklist

  • I have added comments for the new code
  • I added Doxygen docstrings to the new code
  • I have made corresponding changes to the documentation (docs/)
  • I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
  • I have added example cases in examples/ that demonstrate my new feature performing as expected.
    They run to completion and demonstrate "interesting physics"
  • I ran ./mfc.sh format before committing my code
  • New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
  • This PR does not introduce any repeated code (it follows the DRY principle)
  • I cannot think of a way to condense this code and reduce any introduced additional line count

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

  • Checked that the code compiles using NVHPC compilers
  • Checked that the code compiles using CRAY compilers
  • Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
  • Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
  • Enclosed the new feature via nvtx ranges so that they can be identified in profiles
  • Ran a Nsight Systems profile using ./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR
  • Ran an Omniperf profile using ./mfc.sh run XXXX --gpu -t simulation --omniperf, and have attached the output file and plain text results to this PR.
  • Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature

@ChrisZYJ ChrisZYJ requested review from a team as code owners April 1, 2025 21:18
@ChrisZYJ
Copy link
Contributor Author

ChrisZYJ commented Apr 1, 2025

@sbryngelson Do you know what's causing this error? It works locally and I haven't seen this before. I also didn't change any compilation settings or FFTW-related stuff. Thanks!

[ 62%] Performing configure step for 'fftw'
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!
gmake[3]: *** [CMakeFiles/fftw.dir/build.make:92: fftw-prefix/src/fftw-stamp/fftw-configure] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:87: CMakeFiles/fftw.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:94: CMakeFiles/fftw.dir/rule] Error 2
gmake: *** [Makefile:124: fftw] Error 2
 

Error: Failed to build the fftw target.

Terminated

@sbryngelson
Copy link
Member

Try recompiling/re-running the runners. it could be that the run got killed by something. another possibility is that FFTW ended up with a bug in a new release or something, but this seems less likely.

@sbryngelson
Copy link
Member

If only Ubuntu runners are failing, I wonder if something went wrong with a new FFTW version grabbed by those Ubuntu runs. Looking at the workflow file, we have

      - name: Setup Ubuntu
        if:   matrix.os == 'ubuntu' && matrix.intel == false
        run: |
           sudo apt update -y
           sudo apt install -y cmake gcc g++ python3 python3-dev hdf5-tools \
                    libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev

You could look at a previous PR to see if the version has changed in the last day or so. If MacOS is also failing then it is probably a different problem because we brew install fftw and brew and apt are surely not in perfect synchrony with their package versioning. That's one way to debug.

@ChrisZYJ
Copy link
Contributor Author

ChrisZYJ commented Apr 2, 2025

@sbryngelson Thank you very much for the tips! I've tried a few things and will discuss on Slack.

@ChrisZYJ ChrisZYJ requested a review from sbryngelson as a code owner April 3, 2025 04:53
@ChrisZYJ ChrisZYJ mentioned this pull request Apr 3, 2025
20 tasks
@codecov
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 48.64865% with 57 lines in your changes missing coverage. Please review.

Project coverage is 43.54%. Comparing base (4298db0) to head (8de4c80).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/common/m_boundary_conditions.fpp 25.00% 12 Missing and 6 partials ⚠️
src/post_process/m_global_parameters.fpp 55.17% 8 Missing and 5 partials ⚠️
src/pre_process/m_global_parameters.fpp 55.17% 8 Missing and 5 partials ⚠️
src/simulation/m_global_parameters.fpp 55.17% 8 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #814      +/-   ##
==========================================
+ Coverage   43.42%   43.54%   +0.12%     
==========================================
  Files          66       66              
  Lines       19699    19725      +26     
  Branches     2402     2405       +3     
==========================================
+ Hits         8554     8590      +36     
+ Misses       9673     9660      -13     
- Partials     1472     1475       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisZYJ ChrisZYJ mentioned this pull request Apr 3, 2025
19 tasks
@ChrisZYJ ChrisZYJ marked this pull request as draft April 3, 2025 18:24
@ChrisZYJ ChrisZYJ marked this pull request as ready for review April 7, 2025 20:58
@sbryngelson sbryngelson merged commit 775d08d into MFlowCode:master Apr 8, 2025
50 of 76 checks passed
@wilfonba wilfonba mentioned this pull request Apr 17, 2025
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants